CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

set (PROJECT_NAME "netool")
PROJECT(${PROJECT_NAME})

set(CMAKE_BUILD_TYPE "Debug")
#set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -O0 -Wall -g")
set(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -O3 -Wall")

AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src DIR_MAIN_SRCS)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src/arp-tools DIR_ARP_SRCS)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src/dedup-tools DIR_DEDUP_SRCS)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src/graph-tools DIR_GRAPH_SRCS)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/src/test-tools DIR_TEST_SRCS)
add_executable(${PROJECT_NAME} ${DIR_MAIN_SRCS} ${DIR_ARP_SRCS} ${DIR_DEDUP_SRCS} ${DIR_GRAPH_SRCS} ${DIR_TEST_SRCS})
target_link_libraries(${PROJECT_NAME} -lpthread)
